package com.huike.web.controller.business;

import com.huike.business.domain.TbBizTrackRecord;
import com.huike.business.domain.TbBusinessTrackRecord;
import com.huike.business.domain.dto.BizRecordDTO;
import com.huike.business.domain.vo.BizRecordVO;
import com.huike.business.service.TbBusinessTrackRecordService;
import com.huike.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/business")
public class TbBusinessTrackRecordController {

    @Autowired
    private TbBusinessTrackRecordService tbBusinessTrackRecordService;



    @GetMapping("/record/list")
    public AjaxResult tbBusinessTrackRecords(Long businessId){
           List<BizRecordVO> tbBusinessTrackRecords=tbBusinessTrackRecordService.getTbBusinessTrackRecords(businessId);
         return AjaxResult.success(tbBusinessTrackRecords);
    }

@PostMapping("record")
    public AjaxResult businessRecord(@RequestBody BizRecordDTO bizRecordDTO){
        tbBusinessTrackRecordService.getbusinessRecord(bizRecordDTO);
       return AjaxResult.success("添加成功");
    }
}

